package com.yntsoft.mapper;

import java.util.List;
import java.util.Map;

import com.yntsoft.entity.Permission;

public interface PermissionMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Permission record);

    int insertSelective(Permission record);

    Permission selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);

	List<Permission> queryPermissionList(Map<String, Object> searchParam);

	/**
	 * 获取所有的权限
	 * @param typeMenu
	 * @return
	 */
	List<Permission> queryPermissionMenu(Map<String, Object> map);

	/**
	 * 批量删除
	 * @param idList
	 * @return
	 */
	Integer permissionDel(List<String> idList);

	/**
	 * @param id
	 * @return
	 */
	List<Permission> queryPermissionById(Integer id);

	/**
	 * 查询用户拥有的权限
	 * @param map
	 * @return
	 */
	List<Permission> queryByUserId(Map<String, Object> map);

	/**
	 * 获取菜单列表
	 * @param map
	 * @return
	 */
	List<Permission> queryFirstMenu(Map<String, Object> map);

	/**
	 * 获取角色权限
	 * @param roleId
	 * @return
	 */
	List<Permission> getRolePermission(String roleId);

	/**获取权限列表
	 * @return
	 */
	List<Permission> getPermissionList();
}